<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'list.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  <a href="savePerson.jsp">添加</a>
  <form action="findPersonById.action" method="post">
  <input type="text" name="person.id">
  <input type="submit" value="ID查询">
  </form>
  <table border="1">
	<tr>
		<td>人物ID</td>
		<td>姓名</td>
		<td>年龄</td>
		<td>修改人物</td>
		<td>删除人物</td>
	</tr>
	<c:forEach items="${list}" var="person" >
	<tr>
		<td>${person.id}</td>
		<td>${person.name}</td>
		<td>${person.age}</td>
		<td><a href="update.jsp?id=${person.id}&name=${person.name}&age=${person.age}">修改</a></td>
		<td><a href="deletePerson.action?person.id=${person.id}">删除</a></td>
	</tr>
	</c:forEach>
    </table>
  </body>
</html>
